
// <copyright file="DataReaderDecorator.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   The data reader decorator.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Data
{
    using System;
    using System.Data;

    /// <summary>
    /// The data reader decorator.
    /// </summary>
    public class DataReaderDecorator : DataReaderBase, IDataReader
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="DataReaderDecorator"/> class.
        /// </summary>
        /// <param name="adaptedObject">
        /// The adaptedObject.
        /// </param>
        public DataReaderDecorator(IDataReader adaptedObject)
            : base(adaptedObject)
        {
        }

        #endregion Constructors and Finalizers

        #region Public Indexers

        /// <summary>
        /// The this.
        /// </summary>
        /// <param name="name">
        /// The name.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public virtual object this[string name]
        {
            get
            {
                return this.AdaptedObject[name];
            }
        }

        /// <summary>
        /// The this.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public virtual object this[int i]
        {
            get
            {
                return this.AdaptedObject[i];
            }
        }

        #endregion Public Indexers

        #region Public Methods and Operators

        /// <summary>
        /// The get boolean.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public virtual bool GetBoolean(int i)
        {
            return this.AdaptedObject.GetBoolean(i);
        }

        /// <summary>
        /// The get char.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="char"/>.
        /// </returns>
        public virtual char GetChar(int i)
        {
            return this.AdaptedObject.GetChar(i);
        }

        /// <summary>
        /// The get date time.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="DateTime"/>.
        /// </returns>
        public virtual DateTime GetDateTime(int i)
        {
            return this.AdaptedObject.GetDateTime(i);
        }

        /// <summary>
        /// The get decimal.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="decimal"/>.
        /// </returns>
        public virtual decimal GetDecimal(int i)
        {
            return this.AdaptedObject.GetDecimal(i);
        }

        /// <summary>
        /// The get double.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="double"/>.
        /// </returns>
        public virtual double GetDouble(int i)
        {
            return this.AdaptedObject.GetDouble(i);
        }

        /// <summary>
        /// The get float.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="float"/>.
        /// </returns>
        public virtual float GetFloat(int i)
        {
            return this.AdaptedObject.GetFloat(i);
        }

        /// <summary>
        /// The get guid.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="Guid"/>.
        /// </returns>
        public virtual Guid GetGuid(int i)
        {
            return this.AdaptedObject.GetGuid(i);
        }

        /// <summary>
        /// The get int 16.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="short"/>.
        /// </returns>
        public virtual short GetInt16(int i)
        {
            return this.AdaptedObject.GetInt16(i);
        }

        /// <summary>
        /// The get int 32.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="int"/>.
        /// </returns>
        public virtual int GetInt32(int i)
        {
            return this.AdaptedObject.GetInt32(i);
        }

        /// <summary>
        /// The get int 64.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="long"/>.
        /// </returns>
        public virtual long GetInt64(int i)
        {
            return this.AdaptedObject.GetInt64(i);
        }

        /// <summary>
        /// The get string.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="string"/>.
        /// </returns>
        public virtual string GetString(int i)
        {
            return this.AdaptedObject.GetString(i);
        }

        /// <summary>
        /// The get value.
        /// </summary>
        /// <param name="i">
        /// The i.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public virtual object GetValue(int i)
        {
            return this.AdaptedObject.GetValue(i);
        }

        /// <summary>
        /// The get values.
        /// </summary>
        /// <param name="values">
        /// The values.
        /// </param>
        /// <returns>
        /// The <see cref="int"/>.
        /// </returns>
        public virtual int GetValues(object[] values)
        {
            return this.AdaptedObject.GetValues(values);
        }

        #endregion Public Methods and Operators
    }
}